/*
 * 类别搜索
 * @Author: ljb
 * @Date: 2018-03-27 17:51:07
 * @Last Modified by: kanglin
 * @Last Modified time: 2018-08-07 18:04:49
 */
<template>
	<Form
		ref="formInline"
		name="query__form"
		inline
		@keydown.native.enter.prevent="confirmSearch">

		<Form-item
			:label-width="80"
			:label="$t('category.is_show')"
			prop="is_show">
			<Select
				v-model="formValidate.is_show"
				:style="{width: '100px'}"
				clearable
				name="query__is_show"
				transfer>
				<Option
					v-for="item in status"
					:value="item.value"
					:key="item.value">{{ item.label }}</Option>
			</Select>
		</Form-item>

		<Form-item>
			<Button
				type="primary"
				name="query__submit"
				@click="confirmSearch">
				{{ $t('category.is_show') }}
			</Button>
		</Form-item>
	</Form>
</template>
<script>

export default {

	name: 'ProductCategorySearchForm',

	data() {
		return {
			status: [
				{
					label: this.$t('category.no'), // 否
					value: '0',
				},
				{
					label: this.$t('category.yes'), // 是
					value: '1',
				},
			],
			formValidate: {

				is_show: '',

			}, // 搜索框的对象参数
		};
	},

	methods: {

		/**
         * 确认搜索
         * @return {undefined}
         */
		confirmSearch() {
			const param = {

				is_show: this.formValidate.is_show,

			};

			this.$emit('search', param);
		},

	},

};

</script>
